package com.aco.party.service.system;

import com.aco.party.dao.custom.LinksDao;
import com.aco.party.model.po.Links;
import com.aco.party.model.vo.LinksParam;
import com.aco.party.model.vo.common.PageParam;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by flying on 3/10/2016 0010.
 */
@Service
public class LinksService {
    @Resource
    private LinksDao linksDao;

    public List<Links> getByPage(PageParam pageParam,LinksParam param) {
        List<Links> linkss = linksDao.getList(pageParam,param);
        return linkss;
    }

    public Integer getTotal(LinksParam param) {
        return linksDao.getTotal(param);
    }

    public void update(Links links) {
        linksDao.updateByPrimaryKeySelective(links);
    }

    public void add(Links links) {
        linksDao.insertSelective(links);
    }

    public void delete(Long id) {
        linksDao.deleteByPrimaryKey(id);
    }

    public Links getByPrimaryKey(Long id) {
        return linksDao.selectByPrimaryKey(id);
    }
}
